package cn.exrick.xboot.common.jiuqiCommon.advice;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

/**
 * njp
 * 用来拦截所有的controller中的异常（实现统一异常处理）
 */
@ControllerAdvice
public class CommonExceptionHandler {

  /*   @ExceptionHandler(RuntimeException.class)
    public ResponseEntity<String>  handleException(RuntimeException e){
        return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(e.getMessage());
    }*/
}
